
import service.CustomerServiceWrapper;
import javax.xml.ws.Endpoint;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author hahnepeter
 */
public class Server {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        String wrappedServiceAddress = "http://localhost:8084/customers";
        String address = "http://localhost:8012/customers";

        System.out.println("Starting CustomerServiceWrapper on "+address);
        System.out.println("---------------------------------");
        CustomerServiceWrapper service = new CustomerServiceWrapper(wrappedServiceAddress);

        Endpoint.publish(address, service);
        
        
        
        
        /*        System.out.println("testing CustomerService");
        System.out.println("-----------------------------------");
        CustomerServiceWrapper wrapper = new CustomerServiceWrapper("http://localhost:8084/customers");
        String customerId = "1";
        System.out.println("get customer with id "+customerId);

        Customer c = wrapper.getCustomer(customerId);
        if(c != null){
            System.out.println(c.toString());
        }
        System.out.println("update customer with id "+customerId);
        c.setName("mr. new name");
        wrapper.updateCustomer(c);
        c = wrapper.getCustomer(customerId);
        if(c != null){
            System.out.println(c.toString());
        }
        
        System.out.println("retrieving non existent customer with id 34444");
        c = wrapper.getCustomer("34444");
        if(c != null){
            System.out.println(c.toString());
        }*/

    }

}
